{extend name='public/layout'/}
<!-- 本页面要使用的css开始 -->
{block name='css'}
<link rel="stylesheet" href="__STATIC__/api/css/swiper-4.3.5.min.css?v={:time()}" />
<link rel="stylesheet" type="text/css" href="__STATIC__/api/css/send.css?v={:time()}" />
{/block}
<!-- 本页面要使用的css结束 -->
<!-- 本页面要使用的js开始 -->
{block name='js'}
<script src="__STATIC__/api/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.6.0.js" type="text/javascript" charset="utf-8"></script>
<script src="__STATIC__/api/js/send.js" type="text/javascript" charset="utf-8"></script>
{/block}
<!-- 本页面要使用的js结束 -->
<!-- 页面主体开始 -->
{block name='app'}
<ul class="send-nav wrap">
	<li  :class="{active:isActive===index}"
		v-for="(item,index) in nav"
		@click="showNav(index)"
	>{{item.item}}</li>
</ul>
<div class="send-list" v-if="isActive ===0">
	<div class="wrap">

		<div class="cashcard-type" >
			<span>代金券类型：</span>
			<p class="type" @click="showButton()">{{cashcardName.title}}<i></i></p>
			<div class="button-type" v-if="buttonType==true">
				<div class="wrap">
					<ul>
						<li v-for="(item,index) in cashcardType">
							<p @click="chooseType(item.id,index)">{{item.title}}</p>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<div class="voucher-none" v-if="cashcard==''">
			<img src="__STATIC__/api/images/noVoucher.png" alt="">
			<p>暂无优惠券</p>
		</div>
		<ul class="cashcard-list" v-else>
			<li class="clearfix" v-for="(item,index) in cashcard">
				<div class="voucher-money fl">
					<p class="p1"><span>￥</span>{{item.cashcard_price}}</p>
					<p class="p2">{{item.type_name}}</p>
				</div>
				<div class="voucher-name fl">
					<p class="p1">{{item.title}}</p>
					<p class="p2">{{item.expire_at}}到期</p>
					<p class="p3">剩余 <span>{{item.rest_num}}</span>张</p>
				</div>
				<div class="voucher-button fl">
					<a @click="toCashcardDetail(item.id)">点击发放</a>
				</div>
			</li>
		</ul>
	</div>
</div>
<div class="send-list" v-if="isActive ===1">
	<div class="wrap">

		<div class="cashcard-type" >
			<span>代金券类型：</span>
			<p class="type" @click="showButton()">{{cashcardName.title}}<i></i></p>
			<div class="button-type" v-if="buttonType==true">
				<div class="wrap">
					<ul>
						<li v-for="(item,index) in cashcardType">
							<p @click="chooseType(item.id,index)">{{item.title}}</p>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<div class="voucher-none" v-if="cashcard2==''">
			<img src="__STATIC__/api/images/noVoucher.png" alt="">
			<p>暂无优惠券</p>
		</div>
		<ul class="cashcard-list" v-else>
			<li class="clearfix" v-for="(item,index) in cashcard2">
				<div class="voucher-money fl">
					<p class="p1"><span>￥</span>{{item.cashcard_price}}</p>
					<p class="p2">{{item.type_name}}</p>
				</div>
				<div class="voucher-name fl">
					<p class="p1">{{item.title}}</p>
					<p class="p2">{{item.expire_time}}到期</p>
					<p class="p3">剩余 <span>{{item.rest_num}}</span>张</p>
				</div>
				<div class="voucher-button fl">
					<a @click="toCashcardHistory(item.id)">点击查看</a>
				</div>
			</li>
		</ul>
	</div>
</div>
{include file='public/copyright' /}
{/block}
<!-- 页面主体结束 -->

